<template>
  <div class="main-box">
    <div class="big-title">
      <img src="../../assets/movies/logo.png" alt="" class="logo" />
      <div class="name">豆瓣电影</div>
      <Button type="warning" size="large" class="button" @click="toBigScreen"
        >大屏展示</Button
      >
      <Button type="warning" size="large" class="button" @click="toMovieList"
        >电影清单</Button
      >
      <Button type="warning" size="large" class="button" @click="toDataOverview"
        >首页</Button
      >
    </div>
    <div class="type-area-box demo-card">
      <div class="check-box">
        <div class="check-type-box" style="height: 29%">
          <div class="check-type-name">类型：</div>
          <div class="check-type-items">
            <CheckboxGroup
              v-model="moviesTypeCheckedArr"
              @on-change="moviesTypeCheckedChange"
            >
              <Checkbox
                :label="item.name"
                border
                v-for="item in moviesTypeArr"
                :key="item.name"
              ></Checkbox>
            </CheckboxGroup>
          </div>
        </div>
        <div class="check-type-box" style="height: 71%">
          <div class="check-type-name">区域：</div>
          <div class="check-type-items">
            <CheckboxGroup
              v-model="moviesAreaCheckedArr"
              @on-change="moviesAreaCheckedChange"
            >
              <Checkbox
                :label="item.name"
                border
                v-for="item in moviesAreaArr"
                :key="item.name"
              ></Checkbox>
            </CheckboxGroup>
          </div>
        </div>
      </div>
      <RadioGroup
      @on-change="getMoviesByConditions"
        v-model="orderBy"
        style="position: relative; left: -39%; top: 50px"
      >
        <Radio :label="0">按评分排序</Radio>
        <Radio :label="1">按时间排序</Radio>
      </RadioGroup>
      <div class="score-box">
        <div
          class="score-box-item demo-card"
          v-for="(item, index) in movieArr"
          :key="index"
        >
          <img src="@/assets/movies/score-med-img.jpg" alt="" />
          <div class="score-box-item-title">{{ item.fileName }}</div>
          <div class="score-box-item-value">{{ item.comment.score ? item.comment.score : '未知' }}</div>
        </div>
      </div>
	  
	  <Page style="margin-bottom: 0;margin-top: 50px;" :total="total" @on-change="pageChange" show-total :current="pageNum" :page-size="pageSize" />
    </div>
	 
  </div>
</template>
    
    <script>
import movieList from "./movieList";
export default {
  ...movieList,
};
</script>
  <style>
.ivu-checkbox-group-item {
  margin-bottom: 2px;
}
.ivu-checkbox-group {
  text-align: left;
}
.ivu-card-body {
  padding: 0;
}
.ivu-checkbox {
  display: none !important;
}
.ivu-checkbox-wrapper-checked.ivu-checkbox-border {
  background-color: #2d8cf0;
  border-color: #2d8cf0;
  color: #fff;
}
</style>
  <style scoped>
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
.main-box {
  padding-top: 80px;
  position: relative;
  width: 100%;
  background-color: #f2f8fc;
}
.card-style {
  border-radius: 20px;
}
.big-title {
  background-color: #fff;
  height: 80px;
  width: 100%;
  position: fixed;
  z-index: 20;
  top: 0px;
}
.big-title .logo {
  display: inline-block;
  width: 40px;
  margin-right: 4%;
  position: absolute;
  top: 20px;
  left: 20%;
}
.big-title .name {
  position: absolute;
  font-size: 32px;
  font-weight: bold;
  line-height: 80px;
  left: 23%;
}
.big-title .button {
  margin-left: 20px;
  float: right;
  font-size: 15px;
  border: none;
  color: #000;
  background-color: #ffd100;
  top: 20px;
  position: relative;
  right: 20%;
}
.demo-card {
  box-shadow: 1px 1px 10px 1px #77777766;
  background-color: #fff;
  border-radius: 12px;
}
.type-area-box {
  position: relative;
  margin: 21px auto;
  width: 60%;
  height: 1900px;
  
}
.type-area-box .check-box {
  margin: auto;
  width: 96%;
  height: 420px;
  border: 1px #cccccc solid;
  position: relative;
  top: 20px;
}
.type-area-box .check-type-box {
  margin: auto;
  width: 96%;
  height: 49.9%;
  position: relative;
  overflow: hidden;
  top: 10px;
}
.type-area-box .check-type-name {
  width: 7%;
  height: 100%;
  float: left;
}
.type-area-box .check-type-items {
  width: 93%;
  height: 100%;
  float: left;
  overflow: hidden;
}
.score-box {
  padding: 20px 10px;
  position: relative;
  display: flex;
  justify-content: space-between;
  flex-wrap: 	wrap;
  /* margin: auto; */
  width: 100%;
  top: 50px;
  /* height: 66%; */
  text-align: center;
  /* overflow: auto; */
}
.score-box .score-box-item {
  width: 19%;
  margin-bottom: 12px;
}
.score-box .score-box-item > img {
  border-radius: 8px;
  width: 94%;
  height: 73%;
  margin-top: 3%;
}
.score-box .score-box-item-title {
  color: #718096;
  font-weight: bold;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 17px;
  overflow: hidden;
}
.score-box .score-box-item-value {
  color: coral;
  font-family: fantasy;
  font-size: 22px;
  line-height: 21px;
  margin-top: 12px;
}
</style>
    